<template>
  <el-pagination
    :current-page.sync="page"
    @current-change="handleCurrentChange"
    :page-size="limit"
    layout="total, prev, pager, next, jumper"
    :total="total"
  ></el-pagination>
</template>
<script>
export default {
  methods: {
    handleCurrentChange(val) {
      this.page = val;
      this.$emit("change", val);
    }
  },
  props: {
    limit: {
      default: 10
    },
    total: {
      default: 0
    },
    page: {
      default: 1
    }
  }
};
</script>